using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class CatheterMap : EntityTypeConfiguration<Catheter>
    {
        public CatheterMap()
        {
            // Primary Key
            this.HasKey(t => t.CID);

            // Properties
            this.Property(t => t.CName)
                .HasMaxLength(50);

            this.Property(t => t.FValue)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Catheter");
            this.Property(t => t.CID).HasColumnName("CID");
            this.Property(t => t.HospitalID).HasColumnName("HospitalID");
            this.Property(t => t.MID).HasColumnName("MID");
            this.Property(t => t.MNID).HasColumnName("MNID");
            this.Property(t => t.CName).HasColumnName("CName");
            this.Property(t => t.FValue).HasColumnName("FValue");
        }
    }
}
